// 库存管理接口
import request from "@/common/request.js";
const api = {
  machining_repair: "/machining_repair/",
  supplier: "/supplier/",
  machining: "/machining/",
  machining_product: "/machining_product/",
};
const enMaterialTowApi = {
  get_machining_repair(params) {
    return request({
      url: api.machining_repair,
      method: "get",
      params,
    });
  },

  get_supplier(params) {
    return request({
      url: api.supplier,
      method: "get",
      params,
    });
  },

  get_machining(params) {
    return request({
      url: api.machining,
      method: "get",
      params,
    });
  },

  machining_product_detail(params) {
    return request({
      url: api.machining_product,
      method: "get",
      params,
    });
  },

  machining_repair_detail(id) {
    return request({
      url: api.machining_repair + id,
      method: "get",
    });
  },

  post_machining_repair(data) {
    return request({
      url: api.machining_repair,
      method: "post",
      data,
    });
  },

  patch_machining_repair(data, id) {
    return request({
      url: api.machining_repair + id + "/",
      method: "patch",
      data,
    });
  },

  delete_machining_repair(id) {
    return request({
      url: api.machining_repair + id + "/",
      method: "delete",
    });
  },
};
export default enMaterialTowApi
